real_column Derived Type

type, public, extends(data_column) :: real_column

Defines a column of double-precision, floating-point values.


Components

Type Visibility Attributes Name Initial
character(len=:), public, allocatable :: m_name

A header, or column name.


Constructor

public interface real_column

  • private pure function rc_init_empty(n) result(rst)

    Constructs an empty real_column of the requested size.

    Arguments

    Type IntentOptional Attributes Name
    integer(kind=int32), intent(in) :: n

    The number of rows to create.

    Return Value type(real_column)

    The newly constructed real_column object.

  • private pure function rc_init_array(x) result(rst)

    Constructs a new real_column by copying the contents of the supplied array.

    Arguments

    Type IntentOptional Attributes Name
    real(kind=real64), intent(in), dimension(:) :: x

    The array to copy.

    Return Value type(real_column)

    The newly constructed real_column object.


Type-Bound Procedures

procedure, public :: append => rc_append

  • private subroutine rc_append(this, x)

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(inout) :: this
    class(*), intent(in) :: x

procedure, public :: copy => rc_copy

  • private pure subroutine rc_copy(this, dest)

    Copies the contents of this column to the supplied destination array.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(in) :: this

    The real_column object.

    class(*), intent(inout), dimension(:) :: dest

    The destination array.

procedure, public :: count => rc_count

  • private pure function rc_count(this) result(rst)

    Gets the number of values stored in this column.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(in) :: this

    The real_column object.

    Return Value integer(kind=int32)

    The number of values.

procedure, public :: get => rc_get

  • private pure function rc_get(this, row) result(rst)

    Gets the requested value from the column.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(in) :: this

    The real_column object.

    integer(kind=int32), intent(in) :: row

    The row index of the value to retrieve.

    Return Value real(kind=real64)

    The value stored at the requested row.

procedure, public :: get_data_type => rc_get_type

  • private pure function rc_get_type(this) result(rst)

    Gets the type stored by this column.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(in) :: this

    The real_column object.

    Return Value integer(kind=int32)

    The type stored by this column.

procedure, public :: get_name => dc_get_name

  • private pure function dc_get_name(this) result(rst)

    Gets the name associated with the column.

    Arguments

    Type IntentOptional Attributes Name
    class(data_column), intent(in) :: this

    The data_column object.

    Return Value character(len=:), allocatable

    The name.

procedure, public :: insert => rc_insert

  • private subroutine rc_insert(this, row, x)

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(inout) :: this
    integer(kind=int32), intent(in) :: row
    class(*), intent(in) :: x

procedure, public :: remove => rc_remove

  • private subroutine rc_remove(this, row)

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(inout) :: this
    integer(kind=int32), intent(in) :: row

procedure, public :: set => rc_set

  • private subroutine rc_set(this, row, x)

    Sets the requested value into the column.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(inout) :: this

    The real_column object.

    integer(kind=int32), intent(in) :: row

    The row index.

    real(kind=real64), intent(in) :: x

    The value stored at the requested row.

procedure, public :: set_name => dc_set_name

  • private subroutine dc_set_name(this, x)

    Sets the name associated with the column.

    Arguments

    Type IntentOptional Attributes Name
    class(data_column), intent(inout) :: this

    The data_column object.

    character(len=*), intent(in) :: x

    The name.

procedure, public :: slice => rc_slice

  • private function rc_slice(this, first, last) result(rst)

    Returns a borrowed, mutable slice of this column's array.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(inout), target :: this

    The real_column object.

    integer(kind=int32), intent(in) :: first

    The one-based starting index of the slice.

    integer(kind=int32), intent(in) :: last

    The one-based ending index of the slice.

    Return Value class(*), pointer, dimension(:)

    The array pointer, or null if unallocated.

procedure, public :: to_string => rc_to_string

  • private function rc_to_string(this, row, fmt) result(rst)

    Returns the value in the requested row as a string.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(in) :: this

    The real_column object.

    integer(kind=int32), intent(in) :: row

    The row index.

    character(len=*), intent(in), optional :: fmt

    The formatting string (e.g. "F0.6").

    Return Value character(len=:), allocatable

    The resulting string.

procedure, public :: view => rc_view

  • private function rc_view(this) result(rst)

    Returns a borrowed, mutable view of this column's array.

    Arguments

    Type IntentOptional Attributes Name
    class(real_column), intent(inout), target :: this

    The real_column object.

    Return Value class(*), pointer, dimension(:)

    The array pointer, or null if unallocated.